import Vue from 'vue'
import {
  strict
} from 'assert';

const state = {
  activeModule: [], //初始时激活的模块,
  showBaseMapLayer: false, //空间查询-底图切换控制显示隐藏
  showBaseChartLayer: false, //空间查询-专题图层控制显示隐藏
  // showPeripheralList: false, //空间查询-周边查询结果数据列表
  showChartBtnLayer: true, //空间查询-专题图层按钮显示隐藏
  showmacroqueryall: false, //空间查询-专业查询所有条件面板

  showMicroQueryResult:false,//基层查询结果面板
  showFastCollectLayer:false,//快速查询-快速汇总面板
  showTypeTabLayer:false,//地图/表格/统计图切换控制组件
  showTableLayer:false,//浏览表格组件
  showEchartsLayer:false, //地图控制器echarts面板
  showMapTableLayer:false, //地图控制器表格面板
  showMapControl:false, //地图控制器图层面板
  showQueryTableLayer:false, //快速汇总表格面板
  isSearchData:false,//判断是否查询数据
  queryTable:{},//小面板表格数据
  echartsData:{},//小面板图表数据
  enlargeTable:false,//放大表格
  enlargeChart:false,//放大统计图

  showSearchInfoPanel:false,//操作信息面板
  showDetailViewLayer: false, //企业详情面板
  detailViewData:{}//企业详情面板数据
}

const getters = {

}

const mutations = {
  changeDetailViewLayer(state,flag) {
    state.showDetailViewLayer = flag;
  },
  changeDetailViewData(state,data){
    state.detailViewData = data;
  },
  changeSearchInfoPanel(state, flag) {
    state.showSearchInfoPanel = flag;
  },
  changeBaseMapLayer(state, flag) {
    state.showBaseMapLayer = flag;
  },
  changeBaseChartLayer(state, flag) {
    state.showBaseChartLayer = flag;
  },
  changeActiveModule(state, acModule) {
    state.activeModule = acModule;
  },
  changePeripheralList(state, flag) {
    state.showPeripheralList = flag;
  },
  changeshowChartBtnLayer(state, flag) {
    state.showChartBtnLayer = flag;
  },
  //改变综合查询-所有条件展示隐藏
  changeshowmacroqueryall(state, flag) {
    state.showmacroqueryall = flag;
  },
  //快速汇总页面
  changeShowFastCollectLayer(state, flag){
    state.showFastCollectLayer = flag;
  },
  //地图、表格、图表切换组件
  changeShowTypeTabLayer(state,flag){
    state.showTypeTabLayer = flag;
  },
  //浏览表格页面
  changeShowTableLayer(state,flag){
    state.showTableLayer = flag;
  },
  //查询结果面板
  changeShowMicroQueryResult(state,flag){
    state.showMicroQueryResult = flag;
  },
  //地图控制器echarts面板
  changeShowEchartsLayer(state,flag){
    state.showEchartsLayer = flag;
  },
  //地图控制器表格面板
  changeShowMapTableLayer(state,flag){
    state.showMapTableLayer = flag;
  },
  //快速汇总表格面板
  changeShowQueryTableLayer(state,flag){
    state.showQueryTableLayer = flag;
  },
  //判断是否查询数据
  changeSearchDataStatus(state,flag){
    state.isSearchData = flag;
  },
  //小面板表格数据
  changequeryTableData(state,flag){
    state.queryTable = flag;
  },
  //图层控制面板
  changeShowMapControl(state,flag){
    state.showMapControl = flag;
  },
  changeechartsData(state,flag){
    state.echartsData = flag
  },
  changeEnlargeTable(state,status){
    state.enlargeTable = status
  },
  changeEnlargeChart(state,status){
      state.enlargeChart = status
  },

}

export default {
  state,
  getters,
  mutations
}
